﻿#region

using System.Web;
using HouseHoldBudget.Core;
using HouseHoldBudget.Core.Entities.User;

#endregion

namespace HouseHoldBudget.Framework
{
    public class WorkerContext : IWorkerContext
    {
        #region Readonly & Static Fields

        private readonly HttpContextBase _httpContext;

        #endregion

        #region Constructors

        public WorkerContext(HttpContextBase httpContext)
        {
            _httpContext = httpContext;
        }

        #endregion

        #region IWorkerContext Members

        public BudgetUser CurrentUser
        {
            get
            {
                return _httpContext.User as BudgetUser;
            }
        }

        #endregion
    }
}